.class public Lnbisdk/pc;
.super Ljava/lang/Object;


# instance fields
.field private N:Lnbisdk/hh;

.field private uT:[B


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public constructor <init>(Lnbisdk/hh;[B)V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lnbisdk/pc;->N:Lnbisdk/hh;

    iput-object p2, p0, Lnbisdk/pc;->uT:[B

    return-void
.end method

.method public static a(JI)[B
    .locals 10

    const-wide/16 v8, 0x0

    const/4 v7, 0x4

    cmp-long v0, p0, v8

    if-gez v0, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "bepack with negative x"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    new-array v0, v7, [B

    const/4 v1, 0x0

    move-wide v2, p0

    :goto_0
    if-ge v1, v7, :cond_1

    sub-int v4, v7, v1

    const/4 v5, 0x1

    sub-int/2addr v4, v5

    const-wide/16 v5, 0xff

    and-long/2addr v5, v2

    long-to-int v5, v5

    int-to-byte v5, v5

    aput-byte v5, v0, v4

    const/16 v4, 0x8

    shr-long/2addr v2, v4

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_1
    cmp-long v1, v2, v8

    if-eqz v1, :cond_2

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "bepack overflow"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_2
    return-object v0
.end method

.method public static b(Lnbisdk/ou;)J
    .locals 10
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lnbisdk/rp;
        }
    .end annotation

    const-wide/16 v0, 0x0

    const/4 v2, 0x0

    move v7, v2

    move-wide v8, v0

    move-wide v1, v8

    move v0, v7

    :goto_0
    invoke-virtual {p0}, Lnbisdk/ou;->readByte()B

    move-result v3

    and-int/lit8 v4, v3, 0x7f

    int-to-long v4, v4

    mul-int/lit8 v6, v0, 0x7

    shl-long/2addr v4, v6

    or-long/2addr v1, v4

    and-int/lit16 v3, v3, 0x80

    if-nez v3, :cond_0

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-wide v1
.end method

.method public static j(J)[B
    .locals 7

    const-wide/16 v5, 0x0

    cmp-long v0, p0, v5

    if-gez v0, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "uintpack arg is negative"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    new-instance v0, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V

    move-wide v1, p0

    :cond_1
    const-wide/16 v3, 0x7f

    and-long/2addr v3, v1

    long-to-int v3, v3

    const/4 v4, 0x7

    shr-long/2addr v1, v4

    cmp-long v4, v1, v5

    if-lez v4, :cond_2

    invoke-virtual {v0, v3}, Ljava/io/ByteArrayOutputStream;->write(I)V

    :goto_0
    cmp-long v3, v1, v5

    if-gtz v3, :cond_1

    invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v0

    return-object v0

    :cond_2
    or-int/lit16 v3, v3, 0x80

    invoke-virtual {v0, v3}, Ljava/io/ByteArrayOutputStream;->write(I)V

    goto :goto_0
.end method

.method public static s([B)J
    .locals 9

    const-wide/16 v6, 0x0

    array-length v0, p0

    const/16 v1, 0x8

    if-le v0, v1, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "beunpack input too long"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    array-length v0, p0

    const/4 v1, 0x1

    sub-int/2addr v0, v1

    const/4 v1, 0x0

    move-wide v2, v6

    move v8, v0

    move v0, v1

    move v1, v8

    :goto_0
    if-ltz v1, :cond_1

    aget-byte v4, p0, v1

    and-int/lit16 v4, v4, 0xff

    int-to-long v4, v4

    shl-long/2addr v4, v0

    or-long/2addr v2, v4

    add-int/lit8 v1, v1, -0x1

    add-int/lit8 v0, v0, 0x8

    goto :goto_0

    :cond_1
    cmp-long v0, v2, v6

    if-gez v0, :cond_2

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "beunpack result is negative"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_2
    return-wide v2
.end method


# virtual methods
.method public final E()Lnbisdk/hh;
    .locals 1

    iget-object v0, p0, Lnbisdk/pc;->N:Lnbisdk/hh;

    return-object v0
.end method

.method public final jU()[B
    .locals 1

    iget-object v0, p0, Lnbisdk/pc;->uT:[B

    return-object v0
.end method
